<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	 <div id="login" title="用户登录" resizable="false" shadow="false" closable="false" modal="true" collapsible="false" minimizable="false" maximizable="false" style="width:400px;height:200px;text-align:center;padding-top: 30px;">
	    <table  align="center" >
	    	<tr><td>Email:</td><td><input type="text" id="email"></td></tr>
			<tr><td>密码:</td><td><input type="password" id="password"></td></tr>
			<tr><td><button onclick="loginUser()">登录</button></td><td></td></tr>
	    </table>
	<div>
</body>
</html>
<script>
	 $('#login').window();
	 function loginUser()
	 {
	 	var email=$.trim($("#email").val());
	    var password=$.trim($("#password").val());
		if(email=="")
		{
			alert("Email不能为空！");
			return false;
		}else if(password=="")
		{
			alert("密码不能为空！");
			return false;
		}
		 
								 $.getJSON("user!loginUser.action",{'user.email':email,"user.password":password},function(data){
								    if(data.info)
									{
										$('#login').dialog('close');
									}else
									{
										alert("登录失败");
									}
								});
							
			
	 }
	 
</script>